using System;
using ASPNETVN.PORTAL.Components.Helpers;
using ASPNETVN.PORTAL.Components.UI;
using ASPNETVN.PORTAL.Modules.ANNOUNCEMENT.Components;

namespace ASPNETVN.PORTAL.Modules.ANNOUNCEMENT.Controls
{
    public partial class ItemManager : AddEditItemControl
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            hlAddNew.NavigateUrl = HttpUrlBuilder.BuildAddEditUrl(this.ModuleID, 0, "AddEditItem");
        }

        protected void gvItems_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Edit")
            {
                Response.Redirect(HttpUrlBuilder.BuildAddEditUrl(this.ModuleID, Convert.ToInt32(e.CommandArgument), "AddEditItem"));
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
            }
        }
    }
}